#!/bin/sh
#这样日志会很大
#/usr/bin/nohup /opt/jdk1.8.0_281/bin/java -jar /opt/gitee/novel-plus/novel-admin-3.6.1.jar >> /opt/gitee/novel-plus/novel-admin-3.6.1.log 2>&1 &

#不写任何输出
#/usr/bin/nohup /opt/jdk1.8.0_281/bin/java -jar /opt/gitee/novel-plus/novel-admin-3.6.1.jar   > /dev/null 2>&1 &

echo =================================
echo 启动...
echo =================================

#项目路径
curdir=${PWD}

#删除之前的日志
rm -rf $curdir/ms-mcms.log

#/usr/bin/nohup java -jar $curdir/ms-mcms.jar   > /dev/null 2>&1 &

#启动
/usr/bin/nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m -Xms1024m -Xmx1024m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC \
-Dloader.path=lib,config \
-jar -Dfile.encoding=utf-8 -Duser.timezone=GMT+08 -Duser.language=zh -Duser.region=CN $curdir/ms-mcms.jar > $curdir/ms-mcms.log 2>&1 &
#:: > $curdir/ms-mcms.log 2>&1 &

#打印启动时间
currTime=$(date +"%Y-%m-%d %T")
echo $currTime
echo "------done---------"
